﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {


        if (!IsPostBack)
        {
            string s = Request.QueryString.Get("order");
            if (String.IsNullOrEmpty(s))
            {
                disp();
            }
            else
            {
                if (s.Equals("a"))
                {
                    TreeView2.Visible = true;
                    TreeView3.Visible = false;
                    TreeView1.Visible = false;
                    TreeView4.Visible = false;
                    TreeView5.Visible = false;
                    TreeView6.Visible = false;
                }
                if (s.Equals("b"))
                {
                    TreeView3.Visible = true;
                    TreeView2.Visible = false;
                    TreeView1.Visible = false;
                    TreeView4.Visible = false;
                    TreeView5.Visible = false;
                    TreeView6.Visible = false;
                }
                if (s.Equals("c"))
                {
                    TreeView3.Visible = false;
                    TreeView2.Visible = false;
                    TreeView1.Visible = true;
                    TreeView4.Visible = false;
                    TreeView5.Visible = false;
                    TreeView6.Visible = false;
                }
                if (s.Equals("d"))
                {
                    TreeView3.Visible = false;
                    TreeView2.Visible = false;
                    TreeView1.Visible = false;
                    TreeView4.Visible = true;
                    TreeView5.Visible = false;
                    TreeView6.Visible = false;
                }
                if (s.Equals("e"))
                {
                    TreeView3.Visible = false;
                    TreeView2.Visible = false;
                    TreeView1.Visible = false;
                    TreeView4.Visible = false;
                    TreeView5.Visible = true;
                    TreeView6.Visible = false;
                }
                if (s.Equals("f"))
                {
                    TreeView3.Visible = false;
                    TreeView2.Visible = false;
                    TreeView1.Visible = false;
                    TreeView4.Visible = false;
                    TreeView5.Visible = false;
                    TreeView6.Visible = true;
                }
            }


        }
    }

    private void disp()
    {
        for (int i = 0; i < Page.Controls.Count; i++)
        {
            foreach (Control obj in Page.Controls[i].Controls)
            {
                if (obj is TreeView)
                {
                    obj.Visible = false;
                }
            }
        }
    }

}
